FROM swr.cn-east-3.myhuaweicloud.com/saas-prod/jdk17:v01
WORKDIR /var/itjcloud

# 设置变量
ARG JAVA_OPTS

# 设置环境
ENV JAVA_OPTS=$JAVA_OPTS
ENV TimeZone=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8

# copy jar包
COPY build/libs/iot-gateway-0.0.1-SNAPSHOT.jar iot-gateway.jar
EXPOSE 8888

# 执行
ENTRYPOINT ["/bin/sh","-c","exec java $JAVA_OPTS -jar iot-gateway.jar"]